<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <link rel="stylesheet" href="stype.css" type="css/test">
</head>
<body>
    <div id="app1">
        <h1 v-if='If'>显示第一条数据</h1>
        <h1 v-for='a in Name'>{{a.name}}</h1>
        <h1 v-bind:style="type">这是红色的</h1>
    </div>
    <script>
    var app = new Vue({
        el:'#app1',
        data:{If:true,
              Name:[
                  {name:'小小'},
                  {name:'大大'},
                  {name:'中中'},
              ] ,
            type:'color:red'
        }
    })
    </script>
</body>
</html>